package org.com.system.util.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;


import org.apache.commons.beanutils.BeanUtils;

import com.mysql.jdbc.Driver;

public class TestBeanUtils {

	public static void main(String[] args) {
		try{
			
		    DriverManager.registerDriver(new Driver());
		    
		    Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/ant", "root", "su");
		    
		    PreparedStatement ps=conn.prepareStatement("select * from sys_user_info");
		    
		    ResultSet rs=ps.executeQuery();
		    rs.next();
		   System.out.println(BeanUtils.getProperty(rs, "user_name"));
		  
		    rs.close();
		}catch(Exception e){
			
		}
	}
	
}
